/*
 * IRobotSensor.java
 *
 * Created on April 25, 2008, 1:08 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.ncsu.external_sensors;

import com.sun.spot.core.resources.ResourceUnavailableException;



/**
 * The interface for using the various robot sensors that can be connected to the EDemoBoard
 * @author Douglas McClusky
 */
public interface IRobotSensor {
    
    /**
     * @return the raw input value coming from the IIOPin or IScalarInput
     * @throws ResourceUnavailableException if sensor cannot be detected
     */
    public abstract long getRawValue() throws ResourceUnavailableException;
    
    /**
     * @return the value of the sensor in meaningful units that are explained by the implementing class
     * @throws ResourceUnavailableException if sensor cannot be detected
     */
    public abstract double getConvertedValue() throws ResourceUnavailableException;
    
    /**
     * Runs a test to determine if the sensor is actually connected to the pin it has been designated.
     * @return whether the test succeeds
     */
    public abstract boolean testConnection();
    
}
